package com.lld.crowdfunding.mapper;

import com.lld.crowdfunding.entity.QuanXian;
import com.lld.crowdfunding.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper {

    /*实验方法*/
    List<User> getAll();

    /*获取所有用户*/
    List<User> getAllUser(@Param("loginName") String loginName,@Param("role") Integer role);

    /*修改*/
    int updateUser(User user);

    /*根据id查询用户*/
    User getUserById(Long id);

    /*新增注册*/
    int saveUser(User uesr);

    /*删除用户*/
    int deleteUser(Long id);

    /*逻辑删除*/
    int unableUser(Long id,Integer isDeleted);

    /*登录*/
    User login(String loginName);

    /*根据id查用户的权限*/
    List<QuanXian> getUserQuanxian(Long id);

}
